from datetime import datetime

from sqlalchemy import Column, Integer, String, DateTime

from config.database import Base


class ReviewsLookModel(Base):
    __tablename__ = 'tb_reviews_look'
    __table_args__ = {
        'schema': 'reviews'
    }

    look_id = Column(Integer, primary_key=True, autoincrement=True, comment='自增主键')
    reviews_id = Column(String(32), nullable=False, comment='对应的点评ID')
    look_total = Column(Integer, default=0, nullable=False, comment='监视记数')
    last_update_time = Column(DateTime(timezone=True), default=datetime.now(), comment='最后更新时间')
